Background: Android Automated testing was recently performed using Robotium. A problem has been encountered: I need to get a view ID (int type value). I have previously described how to open the view on my phone in two articles in http://maider.blog.
Original acknowledgement: http://xahlee.info/js/js_get_elements.html >
through ID Get element :
document.getElementById (ID string) return element Object, If it fails, get NULLNote ID should be unique within the page, but in iframe is
The properties are as follows:
ParameterType, fully qualified class name or type alias for incoming arguments
KeyColumn, sets the primary key name that is automatically generated by the data table. For a specific database (such as PostgreSQL), if
The first argument for all functions is: element, which represents the reference of the element to be manipulated, in order to add these methods to the DOM object when Element.extend, using the Methodize function. You do not need to enter the first
1. Scope of applicationThe ID can be used except base, head, HTML, script, meta, title tag, and name only applies to select, form, Frame, iframe, IMG, a, input, and so on.HTML element Input type= ' radio ' grouping, only one radio can be selected at
The first parameter of all functions is element, which indicates the reference of the Element to be operated. extend, add these methods to the DOM object, using the methodize function. You do not need to enter the first parameter during the call,
How does jquery get the first or last child element? Through the Children method, children ("Input:first-child")$( This). Children ("Input:first-child"). Val (); $ ( This). Children ("Input:last-child"). Val ();> Selector, $ (". Items>input:first"in
jquery Gets the current value value by Name,id name is the attribute value of the input tag, and jquery provides the attr () method for setting/Change attribute values$("Input:text"). attr ("name"));$("Input:text"). Prop ("name");//You can also get
First of all, the method of JS acquisition, which is more troublesome than the jquery method, followed by the jquery method for comparisonJS is a lot more troublesome than jquery, mainly because the FF browser, the FF browser, will take your newline
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.